<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>打字动画</title>
    <style>
        body {
            padding: 100px;
        }

        div {
            display: inline-block;
            animation: typing 4s steps(10), cart 1s steps(1) infinite;
            /*background: #220033;*/
            /*color: white;*/
            /*padding: 20px;*/
            width: 10em;
            white-space: nowrap;
            overflow: hidden;
            border-right: 1px solid;
        }

        @keyframes cart {
            50% {
                border-color: transparent;
            }
        }

        @keyframes typing {
            from {
                width: 0;
            }
        }
    </style>
</head>
<body>
<div>打字动画是非常酷的。</div>
</body>
</html>
